package com.yyplatform.admin.platform.generator.model.enums;

import com.yyplatform.admin.infra.model.enums.OptionEnum;

/**
 * Created on 2024-09-23
 * const queryTypeOptions = ref([
 * { value: 1, label: '=' },
 * { value: 2, label: 'LIKE "%s%" ' },
 * { value: 3, label: 'IN' },
 * { value: 4, label: 'BETWEEN' },
 * { value: 5, label: '>' },
 * { value: 6, label: '<' },
 * { value: 7, label: '>=' },
 * { value: 8, label: '<=' },
 * { value: 9, label: 'LIKE "%s" ' },
 * { value: 10, label: 'LIKE "s%" ' }
 * ])
 */
public enum QueryTypeEnum implements OptionEnum<Integer> {

    EQ(1, "="),
    LIKE(2, "LIKE '%s%' "),
    IN(3, "in"),
    BETWEEN(4, "BETWEEN"),
    GT(5, ">"),
    GE(6, ">="),
    LT(7, "<"),
    LE(8, "<="),
    NE(9, "!="),
    LIKE_LEFT(10, "LIKE '%s' "),
    LIKE_RIGHT(11, "LIKE 's%' "),
    //
    ;

    private int val;
    private String label;

    QueryTypeEnum(int val, String label) {
        this.val = val;
        this.label = label;
    }


    @Override
    public Integer getValue() {
        return val;
    }

    @Override
    public String getLabel() {
        return label;
    }

}
